<#assign title="忘记密码—邮箱找回" /><#include 'common/header.html' />
<link rel="stylesheet" href="${ctx}/themes/default/css/member.css" type="text/css" />
<div id="findpwd_wrapper">
	<h1>如果您忘记密码<span>请您重新填写下面的表单来获得密码</span></h1>
	<form  method="post"  class="validate" id="findPsswordForm">
	 <table cellspacing="0" cellpadding="0" border="0" width="100%">
		<tbody>
			<tr>
				<th style="width:200px">找回方式： 	</th>
				<td><input type="radio" name="choose" value="0" checked="checked">邮箱查找&nbsp;
					<input type="radio" name="choose" value="1"/>用户名查找</td>
			</tr>
			<tr>
				<th style="width:200px">请输入您的注册邮箱或用户名：</th>
				<td>
					<input type="text"  maxlength="200" id="reg_email"   name="email"  isrequired="true"  autocomplete="off">
				</td>
			</tr>
			 
			<tr>
				<th></th>
				<td>
			 		<div class="btn"><input type="button" id="apply" value="确定" class="yellow_btn"></div>
				</td>
			</tr>
		</tbody>
	</table>
	</form>
</div>
<script type="text/javascript">
	$(function(){
		$("#apply").click(function(){
			//需要验证邮箱格式 或用户名格式
			if(!$("#findPsswordForm").checkall())
				return false;
			var options = {
					url : "${ctx}/api/shop/findPasswordbyEmail/find.do",
					type : "POST",
					dataType : "json",
					success : function(result) {
						if(result.result==0){
							alert(result.message);
						}else{
							alert(result.message);
						}
				 	},
				 	error : function(e) {
				 		alert('出现错误，请重试');
					}
				};
			
			$("#findPsswordForm").ajaxSubmit(options);
		});
	})
</script>
<#include 'common/footer.html' />